Using SFX Variables

PowerZip Self-Extractor gives you a great deal of flexibility in specifying the default "Unzip to" folder with variables. Suppose you want the self-extracting archive to extract files into the user's desktop folder by default. You could type C:\Windows\Desktop. This will work on Windows 9x systems. However, this will not work on other systems such as Windows NT, 2000 and XP (under Windows NT, for instance, the desktop folder is usually C:\Winnt\Profiles\Username\Desktop).

With PowerZip Self-Extractor, you can just type %d and the self-extractor will automatically determine the path to user's desktop folder and replace %d with that path when it is run on the end-user's machine. You can also specify subfolders with variables. For example, type %d\Folder1 if you want the self-extractor to extract files to a folder named Folder1 located in the user's desktop folder by default. There are five different variables you can use:

Variable Description   Most common value
%d Desktop folder C:\Documents and Settings\Username\Desktop
%p Program Files folder C:\Program Files
%t Temporary folder C:\Documents and Settings\Username\Local Settings\Temp
%w Windows folder C:\Windows
%s Windows System folder C:\Windows\System32

NOTE: A variable will be ignored if it's not placed at the beginning the path e.g. C:\%t\Folder1 will remain C:\%t\Folder1

See Also: Self-Extracting Archives